<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-02 19:42:06
 * @LastEditTime: 2022-08-25 21:34:16
 * @LastEditors: CHINAKAIYUAN
 * @Description: 
 */

namespace App\Repositories;

use App\Models\ProProcessPro;

class ProProcessProRepository extends Repositories
    {
    protected $relation_models = ['shift', 'position'];
    public function boot(ProProcessPro $model)
        {
        $this->model = $model;
        }
    //初始化岗位产量
    public function initprocesspro($billdate, $shift_id, $position_id,$route_process_id)
        {
        $procee_pro = $this->firstOrCreate([
            'billdate'    => $billdate,
            'shift_id'    => $shift_id,
            'position_id' => $position_id,
            'route_process_id' => $route_process_id,
        ]);
        return $procee_pro;
        }
    }
